Skip to content

Finished runs ship, one run per ticket, and criteria proven on the preview - #778

Merged
nambok merged 4 commits into
mainfrom
fix-run-ends-1118
Nov 18, 2026
Merged

nambok merged 4 commits into
mainfrom
fix-run-ends-1118

Conversation

@nambok

@nambok nambok commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Runs ended in ways a senior engineer's work wouldn't. One ticket got two runs and two pull requests. Both runs had all their tasks done and were then "handed to you" after a fixed count of continuations. One of them was then failed instead of fixed when its preview check went red with a readable error. A test was reported as failing when its runner had never been installed. The plan check repeated one line several times and called the ticket's own ask out of scope. A broken source image with a working alternative in our own pipeline was sent out as "needs a change outside the code".

This fixes each mechanism for every team, repository and ticket source, with an incident page and a replay test for each (da to df).

Changes

  • One ticket, one run (dc_one_run_per_ticket). Every fresh run takes one atomic claim keyed by the ticket the work is for, at the one place every trigger enters (orchestrate_ticket), through common::one_run and passes::one_run. An issue CoderHelm opens for a tracker ticket carries a marker and a stored link, so it resolves to the same key. A plan task for a ticket a live run already works opens no issue at all (plan_execute.rs).
  • Finished work ships and is never handed back (da_finished_run_ships). The fixed count of continuations after the work is gone. Each continuation names its target: the checks not yet run and the items they left open (run_guard::Target). The run goes on while each one closes something. A step the run asks for by design (the changed tests' sandbox step, the settle stage) isn't counted. When continuing closes nothing, the run ships the pull request with what is open listed, and the stop is taken back at once (lift_shipped_stop). A red check with its error starts the CI fix round, and runs stopped the older way are taken back the same way.
  • A criterion is proven on the page the preview's server sends (dd_criterion_on_the_preview). A criterion about the server's output (its HTML, the page source, the page with JavaScript off) is checked by fetching the preview and the base deployment and judging each, before the pull request is done. A criterion that isn't shown on the preview goes back to the coder. A run whose ticket text names no criteria proves the plan's criteria map instead of nothing.
  • A changed test runs in its own package, and open test findings hold the draft (db_test_runs_in_its_own_package).
    • The sandbox's install is chosen only by the files it runs.
    • A recorded job is kept only when its folder covers every file (TestEnv::misses).
    • A missing runner is recorded as not run because the install failed, never as a failure of the change.
    • A test that ran and fails, passes either way, or proves nothing is a blocked Open item that holds the draft even with CI green.
  • Plan check gaps once, in the ticket's terms (de_plan_check_gaps_once).
    • Only top-level Out of scope bullets are items; nested lookups and evidence never are.
    • A name the ticket uses is never out of scope.
    • Criterion matching ignores repeated and common words.
    • Every gap reaches the decision once (FixDecision::add_gaps).
  • A working alternative is a code fix (df_working_alternative_is_code). When a fix-location trace shows a working value of the same kind next to the wrong one, and a code layer in our repositories chooses between them, an outside verdict goes back as a code fix. A cached outside verdict is judged again under the same rule.

Verification

  1. cargo fmt --all -- --check and rustfmt --edition 2021 --check on each new incident file.
  2. cargo clippy --workspace --all-targets -- -D warnings.
  3. cargo test --workspace. This includes the six new incident cases, the updated p_finished_work_loop case and replay 03, and the check that every case has its page.
  4. Each new incident test fails to build on main: the mechanisms it replays don't exist there.

…s own package

A run whose tasks are done goes on while each continuation closes something
(a check runs that hadn't, or its open items fall below their best), never by
a fixed count. A step the run asks for by design is not counted. When
continuing closes nothing, the run ships its pull request with what is open
listed, and the stop is taken back so CI's errors and comments start the next
round. The changed tests' sandbox picks its install only from the files it
runs, a missing runner is recorded as not run, and a test that ran and fails
or proves nothing holds the draft.
Every fresh run takes one atomic claim keyed by the ticket the work is for,
not the event that carried it in: an issue CoderHelm opens for a tracker
ticket carries a marker and a stored link back to it, so both resolve to the
same key and the second trigger starts nothing. A plan task for a ticket a
live run already works opens no issue at all.
A criterion about what the server sends (its HTML, the page source, the page
with JavaScript off) is checked by fetching the preview and the base
deployment and judging each, before the pull request is done; a criterion
not shown on the preview goes back to the coder. A run whose ticket text
names no criteria proves the plan's criteria map instead of nothing.
… is a code fix

Only top-level Out of scope bullets are items (nested lookups and evidence
never are), a name the ticket uses is never out of scope, a criterion matches
an item only on words that tell items apart, and every gap reaches the
decision once. A fix-location trace that shows a working value of the same
kind beside the wrong one, with a code layer in our repositories, is a code
fix, and a cached outside verdict is judged again under that rule.
@nambok
nambok merged commit d9d6b3a into main Nov 18, 2026
10 checks passed
@nambok
nambok deleted the fix-run-ends-1118 branch November 18, 2026 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant